const app = getApp()
const util= require('../../utils/util.js')
Page({
  onShareAppMessage() {
    return {
      title: 'radio',
      path: 'page/describtion/describtion/radio/radio'
    }
  },

  data: {
    items: [
      {value: 'electrioc', name: '电子产品'},
      {value: 'cloth', name: '服装配饰', checked: 'true'},
      {value: 'study', name: '学习用品'},
      {value: 'beautiful', name: '美妆护肤'},
      {value: 'other', name: '其他'},
    ]
  },

  radioChange(e) {
    console.log('radio发生change事件，携带value值为：', e.detail.value)

    const items = this.data.items
    for (let i = 0, len = items.length; i < len; ++i) {
      items[i].checked = items[i].value === e.detail.value
    }

    this.setData({
      items
    })
  },



  onLoad: function (options) {

  },

})
